<template>
  <div id='menu'>
    <!--<el-menu :default-active='$route.path' class='mar-l el-menu-vertical-demo el-col el-col-4' light router>-->
      <!--<el-menu-item-group title='博客管理'>-->
        <!--&lt;!&ndash;<template v-for='(item) in blog_item' v-if='!item.hidden'>&ndash;&gt;-->
          <!--&lt;!&ndash;<el-menu-item :index='item.path'><i class='fa' :class='item.class'></i>{{item.title}}</el-menu-item>&ndash;&gt;-->
        <!--&lt;!&ndash;</template>&ndash;&gt;-->
      <!--</el-menu-item-group>-->
      <!--<el-menu-item-group title='ElementUI介绍'>-->
        <!--&lt;!&ndash;<template v-for='(item) in element_item' v-if='!item.hidden'>&ndash;&gt;-->
          <!--&lt;!&ndash;<el-menu-item>{{item.title}}</el-menu-item>&ndash;&gt;-->
        <!--&lt;!&ndash;</template>&ndash;&gt;-->
      <!--</el-menu-item-group>-->
    <!--</el-menu>-->
    <el-menu
      default-active="2"
      class="mar-l el-menu-vertical-demo el-col el-col-4"
      @open="handleOpen"
      @close="handleClose">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>导航一</span>
        </template>
        <el-menu-item-group>
          <template slot="title">分组一</template>
          <el-menu-item index="1-1">选项1</el-menu-item>
          <el-menu-item index="1-2">选项2</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group title="分组2">
          <el-menu-item index="1-3">选项3</el-menu-item>
        </el-menu-item-group>
        <el-submenu index="1-4">
          <template slot="title">选项4</template>
          <el-menu-item index="1-4-1">选项1</el-menu-item>
        </el-submenu>
      </el-submenu>
      <el-menu-item index="2">
        <i class="el-icon-menu"></i>
        <span slot="title">导航二</span>
      </el-menu-item>
      <el-menu-item index="3" disabled>
        <i class="el-icon-document"></i>
        <span slot="title">导航三</span>
      </el-menu-item>
      <el-menu-item index="4">
        <i class="el-icon-setting"></i>
        <span slot="title">导航四</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>
<script>
export default {
  data () {
    return {
      element_item: [
        {
          title: '表单',
          path: '/index/form',
          class: 'fa-newspaper-o'
        }, {
          title: '分页',
          path: '/index/epage',
          class: 'fa-pagelines'
        }, {
          title: '标签页',
          path: '/index/tab',
          class: 'fa-tag'
        }, {
          title: '导航栏',
          path: '/index/navmenu',
          class: 'fa-bars'
        }, {
          title: '步骤条',
          path: '/index/step',
          class: 'fa-step-forward'
        }
      ],
      blog_item: [
        {
          title: '用户',
          path: '/index/user',
          class: 'fa-user'
        }, {
          title: '文章',
          path: '/index/article',
          class: 'fa-newspaper-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }, {
          title: '评论',
          path: '/index/comment',
          class: 'fa-comment-o'
        }
      ]
    }
  }
}
</script>
<style>
  /*i.fa {*/
    /*vertical-align: baseline;*/
    /*margin-right: 10px;*/
  /*}*/

  #menu .el-menu {
    height: 100%;
    /*background-color: #fff;*/
    /*position: fixed;*/
    /*float: left;*/
    /*border-right: solid 1px #ccc;*/
    /*overflow: auto;*/
  }
</style>
